package org.iteye.bbjava.util;

import org.iteye.bbjava.util.abstractfactory.AbstractFactory;
import org.iteye.bbjava.util.abstractfactory.ImplementClassProduct;
import org.iteye.bbjava.util.abstractfactory.concre.JavaControllerFileCodeFactory;

public class CodeCreatetTest {
	
	
	public static void main(String []args){
		
		String str = "<table name='user'>' +'<column name='name' dataType='varchar(255)' primarykey='true'></column><column name='password' dataType='varchar(255)' primarykey='false'></column><column name='sex' dataType='bit(1)' primarykey='false'></column><column name='email' dataType='varchar(255)' primarykey='false'></column><column name='phone' dataType='varchar(255)' primarykey='false'></column></table>";
		String str1 ="<entityClass><entity>Person</entity><attribute><attributeType>String</attributeType><dataType>varchar</dataType><attributeName>name</attributeName></attribute></entityClass>";		
		String str2 = "<entityClass><entity>Person</entity><attributes><attribute name='name' javaType = 'java.lang.String' jdbcType = 'varchar' /><attribute name='name' javaType = 'java.lang.String' jdbcType = 'varchar' /></attributes></entityClass>";
//		AbstractFactory af = new JavaDaoFileCodeFactory();
//		af.setEntityXml(str2);
//		ImplementClassProduct icp = af.createImplementClass();
//		String s = icp.getCodeStr();
//		icp.outputImplementClass();
		
		
		AbstractFactory asf = new JavaControllerFileCodeFactory();
		asf.setEntityXml(str2);
		ImplementClassProduct icp1 = asf.createImplementClass();
		String ss = icp1.getCodeStr();
		icp1.outputImplementClass();
		
		
	}

}
